# /usr/bin/python3

# Author: 爱编程的章老师
# @Time: 2021/1/9 0009
# E-mail: Bluesand2010@163.com

import pygame
import sys



def change_title():
    pygame.init()
    s = pygame.display.set_mode((800 ,600))
    pygame.display.set_caption("我的标题栏,我做主")
    while 1:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                sys.exit()


def show_text1():
    pygame.init()
    s = pygame.display.set_mode((800, 600))
    pygame.display.set_caption("我的标题栏,我做主")

    # my_font = pygame.fonts.Font("msyh.ttf", 32)
    fonts = pygame.font.get_fonts()
    if "msyh" in fonts:
        my_font = pygame.font.SysFont("msyh", 32)
    elif "fangsong" in fonts:
        my_font = pygame.font.SysFont("fangsong", 32)
    my_font.set_bold(True) # 设置加粗
    my_font.set_italic(True)  # 设置斜体
    my_font.set_underline(True)  # 设置下划线
    author = my_font.render("我是爱编程的章老师", True, (0, 0, 255))
    s.blit(author, (400, 300))
    pygame.display.update()
    while 1:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                sys.exit()


if __name__ == '__main__':
    show_text1()